import 'package:flutter/material.dart';
import 'package:flutterapp/page/home/info/index.dart';

import 'advertisement.dart';
import 'index_header.dart';
import 'index_main.dart';

class TabMyPage extends StatelessWidget {
  const TabMyPage({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('我的'),
        centerTitle: true,
        elevation: 0,
        actions: [
          IconButton(
            icon: Icon(Icons.settings),
            onPressed: () {
              Navigator.pushNamed(context, 'setting');
            },
          ),
        ],
      ),
      body: ListView(children: [
        //头部登录注册头像组件
        MyHeaderPage(),
        //功能列表组件
        MyMainPage(),
        AdvertisementPage(''),
        // Container(
        //   width: 200.0,
        //   height: 70.0,
        //   color: Colors.green,
        //   child: Image.network(
        //     'http://r0utoyzux.hn-bkt.clouddn.com/adv.jpg',
        //     width: 200.0,
        //     //图片铺满
        //     fit: BoxFit.fill,
        //     //height: 200.0,
        //   ),
        // ),
        InfoPage(
          showTitle: true,
        ),
        Text('sdfasdf')
      ]),
    );
  }
}
